package com.weixin.paleituo.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Author yichao
 * Time  2018/2/8 9:29
 * Dest  订单bean
 */
public class OrderBean implements Parcelable {

    /** 1是有2是没有
     * isSold : 0
     * fullname : 花样年-家天下一期1栋一单元1101
     * housesId : 80
     * orderId : 961156153079758848
     * createTime : 2018-02-07 16:34:19
     * deposit : [{"id":6,"sum":10000,"houseId":"80","coupon":null},{"id":7,"sum":20000,"houseId":"80","coupon":null},{"id":8,"sum":30000,"houseId":"80","coupon":null},{"id":9,"sum":40000,"houseId":"80","coupon":null},{"id":10,"sum":50000,"houseId":"80","coupon":null}]
     */
    private int isSold;
    private String fullname;
    private int housesId;
    private long orderId;
    private String createTime;
    private String content;
    private List<DepositBean> deposit;

    private int time;

    public int getTime() {
        return time;
    }

    public void setTime(int time) {
        this.time = time;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    private String alipay;
    private String wechat;

    public String getAlipay() {
        return alipay;
    }

    public void setAlipay(String alipay) {
        this.alipay = alipay;
    }

    public String getWechat() {
        return wechat;
    }

    public void setWechat(String wechat) {
        this.wechat = wechat;
    }

    @Override
    public String toString() {
        return "OrderBean{" +
                "isSold=" + isSold +
                ", fullname='" + fullname + '\'' +
                ", housesId=" + housesId +
                ", orderId=" + orderId +
                ", createTime='" + createTime + '\'' +
                ", deposit=" + deposit +
                '}';
    }

    public int getIsSold() {
        return isSold;
    }

    public void setIsSold(int isSold) {
        this.isSold = isSold;
    }

    public String getFullname() {
        return fullname;
    }

    public void setFullname(String fullname) {
        this.fullname = fullname;
    }

    public int getHousesId() {
        return housesId;
    }

    public void setHousesId(int housesId) {
        this.housesId = housesId;
    }

    public long getOrderId() {
        return orderId;
    }

    public void setOrderId(long orderId) {
        this.orderId = orderId;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public List<DepositBean> getDeposit() {
        return deposit;
    }

    public void setDeposit(List<DepositBean> deposit) {
        this.deposit = deposit;
    }

    public OrderBean() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.isSold);
        dest.writeString(this.fullname);
        dest.writeInt(this.housesId);
        dest.writeLong(this.orderId);
        dest.writeString(this.createTime);
        dest.writeString(this.content);
        dest.writeTypedList(this.deposit);
        dest.writeInt(this.time);
        dest.writeString(this.alipay);
        dest.writeString(this.wechat);
    }

    protected OrderBean(Parcel in) {
        this.isSold = in.readInt();
        this.fullname = in.readString();
        this.housesId = in.readInt();
        this.orderId = in.readLong();
        this.createTime = in.readString();
        this.content = in.readString();
        this.deposit = in.createTypedArrayList(DepositBean.CREATOR);
        this.time = in.readInt();
        this.alipay = in.readString();
        this.wechat = in.readString();
    }

    public static final Creator<OrderBean> CREATOR = new Creator<OrderBean>() {
        @Override
        public OrderBean createFromParcel(Parcel source) {
            return new OrderBean(source);
        }

        @Override
        public OrderBean[] newArray(int size) {
            return new OrderBean[size];
        }
    };
}
